package com.zdp.common.constant;

/**
 * @author sesshomaru
 * @date 2021/7/10 15:23
 */
public class RedisConstants {

    public static final String NULL_OBJECT = "{}";

    // 缓存商品信息
    public static final String CACHE_ITEM_KEY = "seckill:item:%s";

    // 缓存商品规格信息
    public static final String CACHE_ITEM_SPEC_KEY = "seckill:item:spec:%s";

    // 库存hash key
    public static final String STOCK_KEY = "stock:code:%s";

    // 库存hash key field  剩余库存
    public static final String STOCK_KEY_FIELD_REMAIN = "remain";

    // 库存hash key field  冻结库存
    public static final String STOCK_KEY_FIELD_FREEZE = "freeze";

    // 库存操作锁key
    public static final String LOCK_STOCK_KEY = "stock:lock:code:%s";
}
